package me.cloudcat.eurekaclient.controller;

import com.netflix.ribbon.proxy.annotation.Hystrix;
import me.cloudcat.eurekaclient.service.HelloWorldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.Produces;

/**
 * @Author: jiafeim12345@163.com
 * @Date: 2018/3/25/025 17:13
 */
@RestController
@Produces("application/json")
public class HelloWorldController {

    @Value("${server.port}")
    Integer port;

    @Autowired
    HelloWorldService service;

    @GetMapping(value = "/test")
    public String testOne(Model model) {
        return service.getHi();
    }

}
